document.addEventListener('DOMContentLoaded', () => {
    // 获取其他数据
    fetch('https://32faea8a.r5.cpolar.top/chargeStation/getEveryTotal') // 替换为你的后端API地址
        .then(response => response.json())
        .then(data => {
            const otherData = data.data;

            // 渲染其他数据到指定的 <li> 元素上
            document.getElementById('electricityUsage1').textContent = `${otherData.electricityUsage}度`;
            document.getElementById('chargingCount2').textContent = `${otherData.chargingCount}/次`;
            document.getElementById('chargingDuration3').textContent = `${otherData.chargingDuration}/时`;
            document.getElementById('chargingFee4').textContent = `${otherData.chargingFee}元`;
        })
        .catch(error => console.error('Error fetching other data:', error));
});
